package com.itheima.a04test1;

import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class Service {
    public static void main(String[] args) throws IOException {

        ServerSocket ss = new ServerSocket(10000);

        Socket socket = ss.accept();


        InputStreamReader isr = new InputStreamReader(socket.getInputStream());
        int b;
        while ((b=isr.read())!=-1){
            System.out.print((char) b);
        }

        socket.close();
        ss.close();

    }
}
